<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArTcpConnection Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArTcpConnection.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArTcpConnection-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArTcpConnection Class Reference<div class="ingroups"><a class="el" href="group__UtilityClasses.html">Utility Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>For connecting to a device through a TCP network socket.  
 <a href="classArTcpConnection.html#details">More...</a></p>

<p><code>#include &lt;ArTcpConnection.h&gt;</code></p>

<p>Inherits <a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:abccb5841a624f42faceabff0703637b8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#abccb5841a624f42faceabff0703637b8">Open</a> { <a class="el" href="classArTcpConnection.html#abccb5841a624f42faceabff0703637b8a00f2ba5a1c44e0cef03a2f466e7a8590">OPEN_NET_FAIL</a> = 1, 
<a class="el" href="classArTcpConnection.html#abccb5841a624f42faceabff0703637b8a44cd8a79a2d8c28e68dae6e637a2eb04">OPEN_BAD_HOST</a>, 
<a class="el" href="classArTcpConnection.html#abccb5841a624f42faceabff0703637b8a601216afe9155ecee3394942e50a4a89">OPEN_NO_ROUTE</a>, 
<a class="el" href="classArTcpConnection.html#abccb5841a624f42faceabff0703637b8ac154c44ceb177cf41bebfadf81c6a6a3">OPEN_CON_REFUSED</a>
 }</td></tr>
<tr class="separator:abccb5841a624f42faceabff0703637b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classArDeviceConnection"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classArDeviceConnection')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a></td></tr>
<tr class="memitem:a347c85b1f6dad521cabfbca6833712ab inherit pub_types_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712ab">Status</a> { <br />
&#160;&#160;<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712aba2a32337db15deac68c28c6c6073614f8">STATUS_NEVER_OPENED</a> = 1, 
<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712abaab61fc67dfa26013b7940bbac62449da">STATUS_OPEN</a>, 
<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712aba57899a6a6454d556eb07b44d26d09ab2">STATUS_OPEN_FAILED</a>, 
<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712abad66561776078f16b133e18a67a31a6b2">STATUS_CLOSED_NORMALLY</a>, 
<br />
&#160;&#160;<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712aba3d77512ad91a4c2ff4c57ead86546aaf">STATUS_CLOSED_ERROR</a>
<br />
 }</td></tr>
<tr class="separator:a347c85b1f6dad521cabfbca6833712ab inherit pub_types_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3d9e274eb2de1d9fbb04f8582e9219e0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3d9e274eb2de1d9fbb04f8582e9219e0"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#a3d9e274eb2de1d9fbb04f8582e9219e0">ArTcpConnection</a> ()</td></tr>
<tr class="memdesc:a3d9e274eb2de1d9fbb04f8582e9219e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a3d9e274eb2de1d9fbb04f8582e9219e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02b4e04f71ef78473e756804806aff7b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02b4e04f71ef78473e756804806aff7b"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>close</b> (void)</td></tr>
<tr class="separator:a02b4e04f71ef78473e756804806aff7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f569c84c270fe36277f6c05f49fc5ba"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#a8f569c84c270fe36277f6c05f49fc5ba">getHost</a> (void)</td></tr>
<tr class="memdesc:a8f569c84c270fe36277f6c05f49fc5ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the name of the host connected to.  <a href="#a8f569c84c270fe36277f6c05f49fc5ba">More...</a><br /></td></tr>
<tr class="separator:a8f569c84c270fe36277f6c05f49fc5ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fca5e85ae7660022771819077c32085"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5fca5e85ae7660022771819077c32085"></a>
virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><b>getOpenMessage</b> (int messageNumber)</td></tr>
<tr class="separator:a5fca5e85ae7660022771819077c32085"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad09b8919ecf16458ee4975fd38f08daa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#ad09b8919ecf16458ee4975fd38f08daa">getPort</a> (void)</td></tr>
<tr class="memdesc:ad09b8919ecf16458ee4975fd38f08daa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of the port connected to.  <a href="#ad09b8919ecf16458ee4975fd38f08daa">More...</a><br /></td></tr>
<tr class="separator:ad09b8919ecf16458ee4975fd38f08daa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09a3910297a0e5820702d2b8fd179940"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09a3910297a0e5820702d2b8fd179940"></a>
<a class="el" href="classArSocket.html">ArSocket</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#a09a3910297a0e5820702d2b8fd179940">getSocket</a> (void)</td></tr>
<tr class="memdesc:a09a3910297a0e5820702d2b8fd179940"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the socket this tcp connection is using. <br /></td></tr>
<tr class="separator:a09a3910297a0e5820702d2b8fd179940"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5adeac758a706c7ba7cff85b1aa8a51a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5adeac758a706c7ba7cff85b1aa8a51a"></a>
virtual int&#160;</td><td class="memItemRight" valign="bottom"><b>getStatus</b> (void)</td></tr>
<tr class="separator:a5adeac758a706c7ba7cff85b1aa8a51a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a463cc64e1cf7ca4d414484174691d5a2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a463cc64e1cf7ca4d414484174691d5a2"></a>
virtual <a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>getTimeRead</b> (int index)</td></tr>
<tr class="separator:a463cc64e1cf7ca4d414484174691d5a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab724e586e3bace0e369b3380b6d257c5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab724e586e3bace0e369b3380b6d257c5"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#ab724e586e3bace0e369b3380b6d257c5">internalOpen</a> (void)</td></tr>
<tr class="memdesc:ab724e586e3bace0e369b3380b6d257c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal function used by open and openSimple. <br /></td></tr>
<tr class="separator:ab724e586e3bace0e369b3380b6d257c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61e700a38fe506ffc4131a8fa2a1222c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a61e700a38fe506ffc4131a8fa2a1222c"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>isTimeStamping</b> (void)</td></tr>
<tr class="separator:a61e700a38fe506ffc4131a8fa2a1222c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a745deeb1d377fbf615e91eba755bde"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#a9a745deeb1d377fbf615e91eba755bde">open</a> (const char *host=NULL, int port=8101)</td></tr>
<tr class="memdesc:a9a745deeb1d377fbf615e91eba755bde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens a connection to the given host and port.  <a href="#a9a745deeb1d377fbf615e91eba755bde">More...</a><br /></td></tr>
<tr class="separator:a9a745deeb1d377fbf615e91eba755bde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a156a325867b07a4e154043ed2ecbc889"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a156a325867b07a4e154043ed2ecbc889"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>openSimple</b> (void)</td></tr>
<tr class="separator:a156a325867b07a4e154043ed2ecbc889"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0990aafdc9b4fe23fd5b55f828edf8a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0990aafdc9b4fe23fd5b55f828edf8a3"></a>
virtual int&#160;</td><td class="memItemRight" valign="bottom"><b>read</b> (const char *data, unsigned int size, unsigned int msWait=0)</td></tr>
<tr class="separator:a0990aafdc9b4fe23fd5b55f828edf8a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf79d5e106c1a04aa74c2e859d3d419c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf79d5e106c1a04aa74c2e859d3d419c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setPort</b> (const char *host=NULL, int port=8101)</td></tr>
<tr class="separator:abf79d5e106c1a04aa74c2e859d3d419c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93e658637a2f037834d62da376923b67"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#a93e658637a2f037834d62da376923b67">setSocket</a> (<a class="el" href="classArSocket.html">ArSocket</a> *socket)</td></tr>
<tr class="memdesc:a93e658637a2f037834d62da376923b67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the tcp connection to use this socket instead of its own.  <a href="#a93e658637a2f037834d62da376923b67">More...</a><br /></td></tr>
<tr class="separator:a93e658637a2f037834d62da376923b67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54ba55134cca1bf1a08377d89b07f8db"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54ba55134cca1bf1a08377d89b07f8db"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#a54ba55134cca1bf1a08377d89b07f8db">setStatus</a> (int status)</td></tr>
<tr class="memdesc:a54ba55134cca1bf1a08377d89b07f8db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the status of the device, ONLY use this if you're playing with setSocket and know what you're doing. <br /></td></tr>
<tr class="separator:a54ba55134cca1bf1a08377d89b07f8db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b7338b2c8c38b82798608be9a78048d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5b7338b2c8c38b82798608be9a78048d"></a>
virtual int&#160;</td><td class="memItemRight" valign="bottom"><b>write</b> (const char *data, unsigned int size)</td></tr>
<tr class="separator:a5b7338b2c8c38b82798608be9a78048d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8705c9b0c2ac7d30a0e6f390c932fd0f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8705c9b0c2ac7d30a0e6f390c932fd0f"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArTcpConnection.html#a8705c9b0c2ac7d30a0e6f390c932fd0f">~ArTcpConnection</a> ()</td></tr>
<tr class="memdesc:a8705c9b0c2ac7d30a0e6f390c932fd0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor also closes connection. <br /></td></tr>
<tr class="separator:a8705c9b0c2ac7d30a0e6f390c932fd0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classArDeviceConnection"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classArDeviceConnection')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a></td></tr>
<tr class="memitem:a17585f2fab7b9fb61d2308400f909c30 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a17585f2fab7b9fb61d2308400f909c30">ArDeviceConnection</a> ()</td></tr>
<tr class="memdesc:a17585f2fab7b9fb61d2308400f909c30 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor  <a href="#a17585f2fab7b9fb61d2308400f909c30">More...</a><br /></td></tr>
<tr class="separator:a17585f2fab7b9fb61d2308400f909c30 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1be3e25473f65f096b303b600248622 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac1be3e25473f65f096b303b600248622"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ac1be3e25473f65f096b303b600248622">debugBytesRead</a> (int bytesRead)</td></tr>
<tr class="memdesc:ac1be3e25473f65f096b303b600248622 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifies the device connection that some bytes were read (should call with 0 if it read but got no bytes) <br /></td></tr>
<tr class="separator:ac1be3e25473f65f096b303b600248622 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac2e625974ec5c4e2b117a42b344b0d6 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac2e625974ec5c4e2b117a42b344b0d6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#aac2e625974ec5c4e2b117a42b344b0d6">debugEndPacket</a> (bool goodPacket, int type=0)</td></tr>
<tr class="memdesc:aac2e625974ec5c4e2b117a42b344b0d6 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifies the device connection that the end of a packet was read, which will cause log messages if set to do so. <br /></td></tr>
<tr class="separator:aac2e625974ec5c4e2b117a42b344b0d6 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35b08f34c720cde344ec8179ec162397 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35b08f34c720cde344ec8179ec162397"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a35b08f34c720cde344ec8179ec162397">debugStartPacket</a> (void)</td></tr>
<tr class="memdesc:a35b08f34c720cde344ec8179ec162397 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifies the device connection that the start of a packet is trying to be read. <br /></td></tr>
<tr class="separator:a35b08f34c720cde344ec8179ec162397 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad734f6fdd5d4ad8ae2d3f66a64ea3689 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad734f6fdd5d4ad8ae2d3f66a64ea3689"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ad734f6fdd5d4ad8ae2d3f66a64ea3689">getDeviceName</a> (void) const </td></tr>
<tr class="memdesc:ad734f6fdd5d4ad8ae2d3f66a64ea3689 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the device type (what this is connecting to) <br /></td></tr>
<tr class="separator:ad734f6fdd5d4ad8ae2d3f66a64ea3689 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e3294feb37c8c20020bf81f44826dd3 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e3294feb37c8c20020bf81f44826dd3"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a2e3294feb37c8c20020bf81f44826dd3">getPortName</a> (void) const </td></tr>
<tr class="memdesc:a2e3294feb37c8c20020bf81f44826dd3 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the port name. <br /></td></tr>
<tr class="separator:a2e3294feb37c8c20020bf81f44826dd3 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2068c040aa79530914cc1402328a937 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2068c040aa79530914cc1402328a937"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#aa2068c040aa79530914cc1402328a937">getPortType</a> (void) const </td></tr>
<tr class="memdesc:aa2068c040aa79530914cc1402328a937 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the port type. <br /></td></tr>
<tr class="separator:aa2068c040aa79530914cc1402328a937 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0570caa674aceb844a25f29760a7315 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ac0570caa674aceb844a25f29760a7315">getStatusMessage</a> (int messageNumber) const </td></tr>
<tr class="memdesc:ac0570caa674aceb844a25f29760a7315 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the description string associated with the status.  <a href="#ac0570caa674aceb844a25f29760a7315">More...</a><br /></td></tr>
<tr class="separator:ac0570caa674aceb844a25f29760a7315 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad513aff91486cb69d9fc8a88a04ad1e9 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad513aff91486cb69d9fc8a88a04ad1e9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ad513aff91486cb69d9fc8a88a04ad1e9">setDeviceName</a> (const char *deviceName)</td></tr>
<tr class="memdesc:ad513aff91486cb69d9fc8a88a04ad1e9 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the device type (what this is connecting to) <br /></td></tr>
<tr class="separator:ad513aff91486cb69d9fc8a88a04ad1e9 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a3dd1cd4140ac04b4229dde26edf9de inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a5a3dd1cd4140ac04b4229dde26edf9de">writePacket</a> (<a class="el" href="classArBasePacket.html">ArBasePacket</a> *packet)</td></tr>
<tr class="memdesc:a5a3dd1cd4140ac04b4229dde26edf9de inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes data to connection.  <a href="#a5a3dd1cd4140ac04b4229dde26edf9de">More...</a><br /></td></tr>
<tr class="separator:a5a3dd1cd4140ac04b4229dde26edf9de inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a620e4464627f5f898d212eb11661f150 inherit pub_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a620e4464627f5f898d212eb11661f150"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a620e4464627f5f898d212eb11661f150">~ArDeviceConnection</a> ()</td></tr>
<tr class="memdesc:a620e4464627f5f898d212eb11661f150 inherit pub_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructor also forces a close on the connection <br /></td></tr>
<tr class="separator:a620e4464627f5f898d212eb11661f150 inherit pub_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:ae84c9be27f3e8beec01f0b4c8ada49bf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae84c9be27f3e8beec01f0b4c8ada49bf"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>buildStrMap</b> (void)</td></tr>
<tr class="separator:ae84c9be27f3e8beec01f0b4c8ada49bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classArDeviceConnection"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classArDeviceConnection')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a></td></tr>
<tr class="memitem:a776d6ae9b073c01388089c373b38d2f7 inherit pro_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a776d6ae9b073c01388089c373b38d2f7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>buildStrMap</b> (void)</td></tr>
<tr class="separator:a776d6ae9b073c01388089c373b38d2f7 inherit pro_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7c9793bfdcdaaea2317884b7cc6be0f inherit pro_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7c9793bfdcdaaea2317884b7cc6be0f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ac7c9793bfdcdaaea2317884b7cc6be0f">setPortName</a> (const char *portName)</td></tr>
<tr class="memdesc:ac7c9793bfdcdaaea2317884b7cc6be0f inherit pro_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the port name. <br /></td></tr>
<tr class="separator:ac7c9793bfdcdaaea2317884b7cc6be0f inherit pro_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e10f03aabb179531d177f1004a88a1e inherit pro_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e10f03aabb179531d177f1004a88a1e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a7e10f03aabb179531d177f1004a88a1e">setPortType</a> (const char *portType)</td></tr>
<tr class="memdesc:a7e10f03aabb179531d177f1004a88a1e inherit pro_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the port type. <br /></td></tr>
<tr class="separator:a7e10f03aabb179531d177f1004a88a1e inherit pro_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a1c977dfc213756b925cafdb2aa5ad8a4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c977dfc213756b925cafdb2aa5ad8a4"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myHostName</b></td></tr>
<tr class="separator:a1c977dfc213756b925cafdb2aa5ad8a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a139106f9ca2b1eb8c6b207d0909e0fc7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a139106f9ca2b1eb8c6b207d0909e0fc7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myOwnSocket</b></td></tr>
<tr class="separator:a139106f9ca2b1eb8c6b207d0909e0fc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9477b93089bfee5a65e329f4b5db8f6a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9477b93089bfee5a65e329f4b5db8f6a"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myPortNum</b></td></tr>
<tr class="separator:a9477b93089bfee5a65e329f4b5db8f6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7a9ddc6f6adc962e7829be960348add"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7a9ddc6f6adc962e7829be960348add"></a>
<a class="el" href="classArSocket.html">ArSocket</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>mySocket</b></td></tr>
<tr class="separator:ac7a9ddc6f6adc962e7829be960348add"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04bea6624a94a8c8489d2531b61466b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a04bea6624a94a8c8489d2531b61466b9"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myStatus</b></td></tr>
<tr class="separator:a04bea6624a94a8c8489d2531b61466b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4763ea5e74b5c232f833774975358a6f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4763ea5e74b5c232f833774975358a6f"></a>
ArStrMap&#160;</td><td class="memItemRight" valign="bottom"><b>myStrMap</b></td></tr>
<tr class="separator:a4763ea5e74b5c232f833774975358a6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classArDeviceConnection"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classArDeviceConnection')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a></td></tr>
<tr class="memitem:af99c6065bd53e0dc98347dc92f906f9d inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af99c6065bd53e0dc98347dc92f906f9d"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugBytesRead</b></td></tr>
<tr class="separator:af99c6065bd53e0dc98347dc92f906f9d inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2f6e786c23c028d646d5463463ab97b inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2f6e786c23c028d646d5463463ab97b"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugFirstByteTime</b></td></tr>
<tr class="separator:ad2f6e786c23c028d646d5463463ab97b inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a908a3a99408df65d22200bc4dbcd3ee9 inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a908a3a99408df65d22200bc4dbcd3ee9"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugLastByteTime</b></td></tr>
<tr class="separator:a908a3a99408df65d22200bc4dbcd3ee9 inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5491accdf349d9e90a1feacb0f8e0be0 inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5491accdf349d9e90a1feacb0f8e0be0"></a>
long long&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugNumBadPackets</b></td></tr>
<tr class="separator:a5491accdf349d9e90a1feacb0f8e0be0 inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11ee903b00660b50f45b0b0042814211 inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a11ee903b00660b50f45b0b0042814211"></a>
long long&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugNumGoodPackets</b></td></tr>
<tr class="separator:a11ee903b00660b50f45b0b0042814211 inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a537ec452899503d15060b7728517690b inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a537ec452899503d15060b7728517690b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugPacketStarted</b></td></tr>
<tr class="separator:a537ec452899503d15060b7728517690b inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2727d941ea446a99d555b0281f903b59 inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2727d941ea446a99d555b0281f903b59"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugStartTime</b></td></tr>
<tr class="separator:a2727d941ea446a99d555b0281f903b59 inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada78fa17a93253b773d1bd467d33a1e6 inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada78fa17a93253b773d1bd467d33a1e6"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugTimesRead</b></td></tr>
<tr class="separator:ada78fa17a93253b773d1bd467d33a1e6 inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9db71e9fdb2c834e3d83999bf7d4919a inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9db71e9fdb2c834e3d83999bf7d4919a"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDeviceName</b></td></tr>
<tr class="separator:a9db71e9fdb2c834e3d83999bf7d4919a inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab81bf283a2eec4beb64d2a428dccab99 inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab81bf283a2eec4beb64d2a428dccab99"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myDCPortName</b></td></tr>
<tr class="separator:ab81bf283a2eec4beb64d2a428dccab99 inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e69e51c7c82f8a21d3c2cadd499465d inherit pro_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e69e51c7c82f8a21d3c2cadd499465d"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myDCPortType</b></td></tr>
<tr class="separator:a0e69e51c7c82f8a21d3c2cadd499465d inherit pro_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classArDeviceConnection"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classArDeviceConnection')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a></td></tr>
<tr class="memitem:a9a74569c1d73e65d215a80dbdc1b3394 inherit pub_static_methods_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a74569c1d73e65d215a80dbdc1b3394"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a9a74569c1d73e65d215a80dbdc1b3394">debugShouldLog</a> (bool shouldLog)</td></tr>
<tr class="memdesc:a9a74569c1d73e65d215a80dbdc1b3394 inherit pub_static_methods_classArDeviceConnection"><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes all device connections so that they'll dump data. <br /></td></tr>
<tr class="separator:a9a74569c1d73e65d215a80dbdc1b3394 inherit pub_static_methods_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_static_attribs_classArDeviceConnection"><td colspan="2" onclick="javascript:toggleInherit('pro_static_attribs_classArDeviceConnection')"><img src="closed.png" alt="-"/>&#160;Static Protected Attributes inherited from <a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a></td></tr>
<tr class="memitem:a8295d8f30b513dda5b207a4b5ad11573 inherit pro_static_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8295d8f30b513dda5b207a4b5ad11573"></a>
static <a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>ourDCDebugFirstTime</b></td></tr>
<tr class="separator:a8295d8f30b513dda5b207a4b5ad11573 inherit pro_static_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8810181d6514b20111dcf5432cb31573 inherit pro_static_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8810181d6514b20111dcf5432cb31573"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><b>ourDCDebugShouldLog</b> = false</td></tr>
<tr class="separator:a8810181d6514b20111dcf5432cb31573 inherit pro_static_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad51c11cab5a66044585206d23de5381b inherit pro_static_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad51c11cab5a66044585206d23de5381b"></a>
static ArStrMap&#160;</td><td class="memItemRight" valign="bottom"><b>ourStrMap</b></td></tr>
<tr class="separator:ad51c11cab5a66044585206d23de5381b inherit pro_static_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c543c7225d411a2ee97927f4a0878a8 inherit pro_static_attribs_classArDeviceConnection"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9c543c7225d411a2ee97927f4a0878a8"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><b>ourStrMapInited</b> = false</td></tr>
<tr class="separator:a9c543c7225d411a2ee97927f4a0878a8 inherit pro_static_attribs_classArDeviceConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>For connecting to a device through a TCP network socket. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="twoRobotWander_8cpp-example.html#_a7">twoRobotWander.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="abccb5841a624f42faceabff0703637b8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classArTcpConnection.html#abccb5841a624f42faceabff0703637b8">ArTcpConnection::Open</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="abccb5841a624f42faceabff0703637b8a00f2ba5a1c44e0cef03a2f466e7a8590"></a>OPEN_NET_FAIL&#160;</td><td class="fielddoc">
<p>Some critical part of the network isn't working. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="abccb5841a624f42faceabff0703637b8a44cd8a79a2d8c28e68dae6e637a2eb04"></a>OPEN_BAD_HOST&#160;</td><td class="fielddoc">
<p>Could not find the host. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="abccb5841a624f42faceabff0703637b8a601216afe9155ecee3394942e50a4a89"></a>OPEN_NO_ROUTE&#160;</td><td class="fielddoc">
<p>Know where the host is, but can't get to it. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="abccb5841a624f42faceabff0703637b8ac154c44ceb177cf41bebfadf81c6a6a3"></a>OPEN_CON_REFUSED&#160;</td><td class="fielddoc">
<p>Got to the host but it didn't allow a connection. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a8f569c84c270fe36277f6c05f49fc5ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string ArTcpConnection::getHost </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the name of the host connected to. </p>
<dl class="section return"><dt>Returns</dt><dd>the name of the host connected to </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArTcpConnection.html#ad09b8919ecf16458ee4975fd38f08daa" title="Gets the number of the port connected to. ">getPort</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ad09b8919ecf16458ee4975fd38f08daa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ArTcpConnection::getPort </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the number of the port connected to. </p>
<dl class="section return"><dt>Returns</dt><dd>the number of the port connected to </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArTcpConnection.html#a8f569c84c270fe36277f6c05f49fc5ba" title="Gets the name of the host connected to. ">getHost</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a9a745deeb1d377fbf615e91eba755bde"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ArTcpConnection::open </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em> = <code>8101</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens a connection to the given host and port. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname or IP address to connect to, if NULL (default) then localhost </td></tr>
    <tr><td class="paramname">port</td><td>the port to connect to. (the default port, 8101, is the TCP port number used by the wireless bridge device and by the simulator for robot connection) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 for success, otherwise one of the open enums </dd></dl>
<dl class="section see"><dt>See also</dt><dd>getOpenMessage </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="twoRobotWander_8cpp-example.html#a15">twoRobotWander.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a93e658637a2f037834d62da376923b67"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArTcpConnection::setSocket </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArSocket.html">ArSocket</a> *&#160;</td>
          <td class="paramname"><em>socket</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the tcp connection to use this socket instead of its own. </p>
<p>This will make the connection use this socket, its useful for doing funkier things with sockets but still being able to use a device connection.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">socket</td><td>the socket to use </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArTcpConnection.h</li>
<li>ArTcpConnection.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArTcpConnection.html">ArTcpConnection</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
